package xin.core.jpa.model;

import xin.core.jpa.JpaConstant;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

@MappedSuperclass
@Cacheable
@Data
public abstract class SimpleEntity {

	@NotBlank
	@Column(nullable = false, length = JpaConstant.NameColumnLength)
	protected String name;

	@Column(length = JpaConstant.DescriptionColumnLength)
	protected String description;
}
